package lsy.redis001.lsyredis001.controller;

import lsy.redis001.lsyredis001.common.response.RespEntity;
import lsy.redis001.lsyredis001.service.TagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/tag")
public class TagController {
    @Autowired
    private TagService tagService;

    @RequestMapping("/all")
    public RespEntity<List<String>> getAllTags(){
        List<String> tags = tagService.getAllTag();
        return RespEntity.success(tags);
    }
}
